<template>
  <div class="router-content">
    <inside v-for="(div, index) in article" :key="index" :title="div.title" :contents="div.contents" :urls="div.urls"></inside>
  </div>
</template>

<script>
import Bus from '@/assets/bus'
import inside from '@/components/inside'
export default {
  name: 'index',
  components: {
    inside
  },
  data () {
    return {
      menus: [],
      article: []
    }
  },
  created () {
    this.menus = this.$route.matched
    Bus.$emit('menus', this.menus)
    // console.log(this.$route.matched)
    this.write()
  },
  methods: {
    write () {
      this.article = [
        {
          title: '创建品类',
          contents: [
            '进入品类，点击“创建”按钮，如下图所示，',
            '弹出编辑单品类别对话框，填写品类名称，点击确定，即创建品类成功。'
          ],
          urls: [
            '/static/imgs/base/categoryc_1.png',
            '/static/imgs/base/categoryc_2.png'
          ]
        }, {
          title: '修改品类名称',
          contents: [
            '选择已有的单品类别，点击页面上方的改名，如下图所示，',
            '弹出编辑品类的对话框，修改品类名称，点击提交，即可改名成功。'
          ],
          urls: [
            '/static/imgs/base/categoryc_3.png',
            '/static/imgs/base/categoryc_4.png'
          ]
        }, {
          title: '删除品类',
          contents: [
            '选择已有的单品类别，点击单品类别页面的删除按钮，如下图所示',
            '弹出删除对话框，点击确定，即可删除单品类别。'
          ],
          urls: [
            '/static/imgs/base/categoryc_5.png',
            '/static/imgs/base/categoryc_6.png'
          ]
        }
      ]
    }
  }
}
</script>
<style>
</style>
